<template>
  <div id="nuxt-app">
    <div class="h-screen">
      <div v-if="loading" class="fixed left-0 top-0 h-3px w-full z-50 bg-green-500 bg-grad" />
      <NuxtPage />
      <el-backtop class="app-backtop" :right="50" :bottom="150" />
    </div>
  </div>
</template>
<script setup lang="ts">
const nuxtApp = useNuxtApp()
const loading = ref(false)
nuxtApp.hook('page:start', () => {
  loading.value = true
})
nuxtApp.hook('page:finish', () => {
  loading.value = false
})
</script>
<style lang="scss">
.bg-grad {
  background-image: linear-gradient(to right, red, yellow);
}
</style>
